<?php
class ActionParser{

	public static function Instance(){
		return new ActionParser();
	}

	public function successMsg($otherMsg){
		return $this->msg("success",$otherMsg);
	}
	
	public function errorMsg(){
		return $this->msg("failure","");
	}
	
	private function msg($msg,$otherMsg){
		$itemArray['Message'] = $msg;
		$itemArray['Result'] = $otherMsg;
		$entity = new Entity();
		$entity->entityName = "Result";
		$entity->entityValue = $itemArray;
		$xml = XmlUtil::Factory()->entityToXml($entity,0,0);
		return $xml;
	}
}